package com.example.cupid.service.Impl;

import com.example.cupid.mapper.OrderMapper;
import com.example.cupid.pojo.Order;
import com.example.cupid.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Date;

/**
 * 2021/9/6
 **/
@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Override
    public int saveOrder(Order order) {
        return orderMapper.insertOrder(order);
    }
    @Override
    public int checkOrderYd(Date dateyd) {
        return orderMapper.selectCountYd(dateyd);
    }

    @Override
    public int checkOrderTd(Date datetd) {
        return orderMapper.selectCountTd(datetd);
    }

    @Override
    public int checkOrderByNo(String trade_no) {
        return orderMapper.selectCountByNo(trade_no);
    }
}
